﻿using Abp.AutoMapper;
using Abp.Domain.Entities;
using SingleUserMall.Items;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static SingleUserMall.Items.Item;

namespace SingleUserMall.Orders.VO
{
    /// <summary>
    /// 订单
    /// </summary>
    [AutoMapFrom(typeof(Order))]
    public class OrderDividendMiniVO : Entity<long>
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }
        /// <summary>
        ///  状态（-1：取消，0：未提交，1：待付款，2：已付款，3：已成团，4：已发货，5：已收货，6：已评价）
        /// </summary>
        public OrderStatus? Status { get; set; }
        /// <summary>
        /// 分红商品状态 0：未开始分红，1：分红中 ，2：分红完成
        /// </summary>
        public DividendStatus? DividendItemStatus { get; set; }
        /// <summary>
        /// 状态名称
        /// </summary>
        public string StatusView => Status?.GetDescription();
        /// <summary>
        /// 头像
        /// </summary>
        public string Avatar { get; set; }
        /// <summary>
        /// 朋友头像
        /// </summary>
        public string FriendAvatar { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 朋友昵称
        /// </summary>
        public string FriendUserName { get; set; }
        /// <summary>
        /// 购买棵数
        /// </summary>
        public int Qty { get; set; }


        /// <summary>
        /// 手机号码
        /// </summary>
        public string PhoneNumber { get; set; }
        
        /// <summary>
        /// 是否是朋友的理财产品
        /// </summary>
        public bool IsFriend { get; set; }
        /// <summary>
        /// 合计费用
        /// </summary>
        public decimal? Amount { get; set; }
        /// <summary>
        /// 实际费用
        /// </summary>
        public decimal? ActualAmount { get; set; }
        /// <summary>
        /// 购买人
        /// </summary>
        public string Purchaser { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        public string PurchaserPhone { get; set; }
        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime? PayTime { get; set; }

        /// <summary>
        /// 分红结束时间
        /// </summary>
        public DateTime? DividendEndTime { get; set; }
        /// <summary>
        /// 订单商品
        /// </summary>
        public IReadOnlyList<OrderDetailVO> OrderDetails { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        //public WorkerViewVO WorkerView { get; set; }
        public string Message { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }

        /// <summary>
        /// 所有收益归朋友
        /// </summary>
        public bool AllBenefitForFriend { get; set; }

    }
}
